#ifndef __C_DYNAMIC_SCENE_OBJECT_H_INCLUDED__
#define __C_DYNAMIC_SCENE_OBJECT_H_INCLUDED__
#include "IDynamicObject.h"
#include "IAnimatedMesh.h"
#include "IAnimatedMeshSceneNode.h"
#include "IVideoDriver.h"

namespace game
{
	
	
	namespace scene
	{

		class CDynamicObject : public IDynamicObject
		{
		public:
			//! Default constructor
			CDynamicObject(	SDynamicObjectEntry* entry,
							irr::scene::ISceneManager* sceneManager, 
							video::IVideoHandler* videoHandler);

			//! Destructor
			virtual ~CDynamicObject();

			virtual void addAnimationInfo(const c8* name, SAnimationEntry* animation);
			
			virtual SAnimationEntry* getAnimationInfo(const c8* name);

			//! Adds named mesh to scene object
			virtual void addMesh(const c8* name, irr::scene::IAnimatedMesh* mesh);

			//! Adds named mesh to scene object from file
			virtual void addMesh(const c8* name, const c8* file);

			//! Adds texture
			virtual void  addTexture(const c8* name, irr::video::ITexture* texture);

			//! Adds texture from file
			virtual void  addTexture(const c8* name, const c8* file);

			//! Adds object to game scene 
			virtual void addToScene();

			//! Sets object scale 
			virtual void setScale(const irr::core::vector3df& value);

			//! Gets object scale
			virtual irr::core::vector3df getScale();

			//! Sets object rotation 
			virtual void setRotation(const irr::core::vector3df& value);

			//! Gets object rotation
			virtual irr::core::vector3df getRotation();

			virtual EGAME_OBJECT_TYPE getType();

		protected:

			irr::core::map<irr::core::stringc, SAnimationEntry*> Animations;
			
			irr::core::map<irr::core::stringc, irr::scene::IAnimatedMesh*> Meshes;

			irr::core::map<irr::core::stringc, irr::video::ITexture*> Textures;

			irr::core::map<irr::core::stringc, irr::scene::IAnimatedMeshSceneNode*> SceneNodes;

		private:
			EGAME_OBJECT_TYPE Type;

		};
	}
}
#endif